//
//  PKPlayMusicView.m
//  AMomentApp
//
//  Created by lanou on 15/10/6.
//  Copyright (c) 2015年 lanou. All rights reserved.
//

#import "PKPlayMusicView.h"

@implementation PKPlayMusicView

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        _pageControl = [[UIPageControl alloc]initWithFrame:CGRectMake((SCREEN_WIDTH-80)/2, 0, 80, 20)];
        _pageControl.numberOfPages = 4;
        _pageControl.currentPageIndicatorTintColor = [UIColor greenColor];
        _pageControl.pageIndicatorTintColor = [UIColor lightGrayColor];
        _pageControl.currentPage = 1;
        [self addSubview:_pageControl];
        
        UIImageView *lineImageView = [[UIImageView alloc]initWithFrame:CGRectMake(20, 20, SCREEN_WIDTH-10, 1)];
        lineImageView.backgroundColor = [UIColor colorWithWhite:0.667 alpha:0.470];
        lineImageView.image = [UIImage imageNamed:@"line"];
        [self addSubview:lineImageView];
        
        _beforeButton = [UIButton buttonWithType:UIButtonTypeCustom];
        _beforeButton.frame = CGRectMake(50, 35, 20, 20);
        [_beforeButton setImage:[UIImage imageNamed:@"before"] forState:UIControlStateNormal];
        [self addSubview:_beforeButton];
        
        _playButton = [UIButton buttonWithType:UIButtonTypeCustom];
        _playButton.frame = CGRectMake(SCREEN_WIDTH/2-10, 30, 25, 25);
        [_playButton setImage:[UIImage imageNamed:@"play"] forState:UIControlStateNormal];
        [_playButton setImage:[UIImage imageNamed:@"pause"] forState:UIControlStateSelected];
        [self addSubview:_playButton];
        
        _nextButton = [UIButton buttonWithType:UIButtonTypeCustom];
        _nextButton.frame = CGRectMake(SCREEN_WIDTH-60, 35, 20, 20);
        [_nextButton setImage:[UIImage imageNamed:@"next"] forState:UIControlStateNormal];
        [self addSubview:_nextButton];
    }
    return self;
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
